package company.permissionsystem.security.roleassignment.enumerate;

import company.permissionsystem.security.roleassignment.PermissionAssignment;
import company.permissionsystem.security.roleassignment.PowerAssignment;

public enum RoleEnum implements PowerAssignment {

   ROLE_admin {
       @Override
       public PermissionAssignment op() {
           PermissionAssignment permissionAssignment = new PermissionAssignment();
           permissionAssignment.setDruidMonitoring(true);
           permissionAssignment.setSwaggerMonitoring(true);
           permissionAssignment.setAdminMonitoring(true);
           return permissionAssignment;
       }
   },

    ROLE_user {
        @Override
        public PermissionAssignment op() {
            PermissionAssignment permissionAssignment = new PermissionAssignment();
            permissionAssignment.setDruidMonitoring(false);
            permissionAssignment.setSwaggerMonitoring(false);
            permissionAssignment.setAdminMonitoring(false);
            return permissionAssignment;
        }
    }

}
